package com.xbongbong.saas.domain.entity;

import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * 对账流水关联的产品数据
 */
@Getter
@Setter
@ToString
public class CustomerStatementProductEntity implements Serializable {
    private static final long serialVersionUID = -8104673351601696266L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 公司id
     */
    private String corpid;
    /**
     * 是否为快照数据
     */
    private Integer snapshot;

    /**
     * 对账流水的id
     */
    private Long statementId;

    /**
     * 产品id
     */
    private Long productId;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 产品编号
     */
    private String productNo;

    /**
     * 产品数量
     */
    private Double productNum;

    /**
     * 产品单位
     */
    private String productUnit;

    /**
     * 产品价格
     */
    private Double productPrice;

    /**
     * 
     */
    private Long addTime;

    /**
     * 
     */
    private Long updateTime;

    /**
     * 
     */
    private Integer del;

    /**
     * 产品规格
     */
    private String productSpecification;

    public CustomerStatementProductEntity() {
    }

    public CustomerStatementProductEntity(String corpid, Integer snapshot) {
        long now = DateTimeUtil.getInt();
        this.corpid = corpid;
        this.snapshot = snapshot;
        this.addTime = now;
        this.updateTime = now;
        this.del = 0;
    }
}